﻿@model Kooboo.CMS.Web.Areas.Contents.Models.SelectableViewModel
@using Kooboo.CMS.Content.Query
@using Kooboo.CMS.Content.Models
@using Kooboo.CMS.Web.Areas.Contents.Controllers
@{
    
}
<div class="command clearfix">
    @Html.Partial("Search")
</div>
<form id="selectedForm" action="">
<div class="table-container clearfix">
	<table class="datasource">
		<thead>
			<tr>
			<th class="checkbox"></th>
					<th class="common name">Ürün Adı</th>
		<th class="common utccreationdate">Date</th>
		<th class="common published">Published</th>

			</tr>
		</thead>
		<tbody>		
            @{var index = 0;}	
			@foreach (dynamic item in Model.Contents)
			{			
			<tr class=@((index%2!=0)? "even" : "")>
				<td>
                    @if(Model.SingleChoice){
                        <input type="radio" value='@item["UUID"]' name="chkContent"/> 
                    }else{
                       <text>@Html.CheckBox("chkContent",false,new {value = item["UUID"],@class="checkboxList"})</text> 
                    }
					
				</td>
					<td>@(item.Name ?? "")</td>
		<td class="date">@(DateTime.Parse(item["UtcCreationDate"].ToString()).ToLocalTime().ToShortDateString())</td>
		<td class="action"><span class="o-icon @((item.Published!=null && item.Published == true)?"tick":"cross")"></span></td>			
			</tr>
			index++;
			}
		</tbody>
	</table>
	<div class="pager">
		@Html.Pager(Model.Contents)
	</div>
</div>
</form>